package com.example.ycshareelement.transition

import android.os.Bundle
import android.os.Parcel
import android.os.Parcelable
import android.view.View

/**
 * Created by huangwei on 2018/10/7.
 */
open class ViewStateSaver() : Parcelable {
    constructor(parcel: Parcel) : this() {
    }

    open fun captureViewInfo(view: View?, bundle: Bundle?) {}
    override fun describeContents(): Int {
        return 0
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {

    }

    companion object CREATOR : Parcelable.Creator<ViewStateSaver> {
        override fun createFromParcel(parcel: Parcel): ViewStateSaver {
            return ViewStateSaver(parcel)
        }

        override fun newArray(size: Int): Array<ViewStateSaver?> {
            return arrayOfNulls(size)
        }
    }

}